package com.deke.student.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.deke.entity.TbMember;
import com.deke.student.vo.UpTbMenberVo;
import org.apache.ibatis.annotations.Select;

/**
 * @author ：陈昂（731712841@qq.com）
 * @date ：Created in 2022/12/6 12:18
 * @description：
 * @modified By：
 * @version:
 */
public interface TbMenberDao extends BaseMapper<TbMember> {
        public void UpdateTbMenber(UpTbMenberVo upTbMenberVo);
        public void UpdateTbMenberState(String id ,Integer isDisabled);

        //根据手机号查找用户
        public TbMember queryMemberByMobile(String mobile);
        /**
         * 根据id查询用户信息
         * @param id
         * @return
         */
        public TbMember selectQueryAllId(String id);
        /**
         * 根据手机查询用户信息
         * @param mobile 手机号
         * @return
         */
        TbMember selectQueryAllMobile(String mobile);



        /**
         * 修改用户密码
         * @param mobile
         * @param password
         * @return
         */
        int updatePassword(String mobile, String password);

        @Select(value = "select password from tb_member where mobile = #{mobile} ")
        String checkPassword(String mobile);
}
